package com.qf.mvc01.utils;

import com.qf.mvc01.entity.User;

import java.util.HashMap;
import java.util.Map;

public class MyUserMap {
    private static Map<String,User> mapUser = new HashMap<>();

    public static void addUser(String name,User user){

        mapUser.put(name,user);

    }

    public static String selectUser(String name){
        if (mapUser.containsKey(name)){
            return "2";
        }else {
            return "1";
        }
    }
}
